package com.xu.fountain.Entity;

import javax.persistence.*;
import java.util.Objects;

@Entity
@Table(name = "fountain_facility", schema = "fountain", catalog = "")
public class FountainFacilityEntity {
    private int id;
    private int code;
    private int status;
    private String remark;
    private Integer agentid;
    private int loginstatus;
    private String lastlogin;
    private String lastquit;

    @Id
    @Column(name = "id")
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    @Basic
    @Column(name = "code")
    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    @Basic
    @Column(name = "status")
    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    @Basic
    @Column(name = "remark")
    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    @Basic
    @Column(name = "agentid")
    public Integer getAgentid() {
        return agentid;
    }

    public void setAgentid(Integer agentid) {
        this.agentid = agentid;
    }

    @Basic
    @Column(name = "loginstatus")
    public int getLoginstatus() {
        return loginstatus;
    }

    public void setLoginstatus(int loginstatus) {
        this.loginstatus = loginstatus;
    }

    @Basic
    @Column(name = "lastlogin")
    public String getLastlogin() {
        return lastlogin;
    }

    public void setLastlogin(String lastlogin) {
        this.lastlogin = lastlogin;
    }

    @Basic
    @Column(name = "lastquit")
    public String getLastquit() {
        return lastquit;
    }

    public void setLastquit(String lastquit) {
        this.lastquit = lastquit;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        FountainFacilityEntity that = (FountainFacilityEntity) o;
        return id == that.id &&
                code == that.code &&
                status == that.status &&
                loginstatus == that.loginstatus &&
                Objects.equals(remark, that.remark) &&
                Objects.equals(agentid, that.agentid) &&
                Objects.equals(lastlogin, that.lastlogin) &&
                Objects.equals(lastquit, that.lastquit);
    }

    @Override
    public int hashCode() {

        return Objects.hash(id, code, status, remark, agentid, loginstatus, lastlogin, lastquit);
    }
}
